//
//  Fraction.h
//  OC_03_属性_点语法
//
//  Created by wyx on 16/2/26.
//  Copyright © 2016年 Apon. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject
/** 属性 */
@property (nonatomic,assign) NSInteger denominator;/** 分母 */
@property (nonatomic,assign) NSInteger numerator;/** 分子 */
/** 方法 */
- (instancetype)initWithNumerator:(NSInteger)numerator denominator:(NSInteger)denominator;
+ (instancetype)fractionWithNumeration:(NSInteger)numerator denominator:(NSInteger)denominator;
/** 加减乘除 */
- (Fraction *)addWithFraction:(Fraction *)frac;
- (Fraction *)subWithFraction:(Fraction *)frac;
- (Fraction *)mulWithFraction:(Fraction *)frac;
- (Fraction *)divWithFraction:(Fraction *)frac;
/** 比较大小 */
- (void)cmpWithFraction:(Fraction *)frac;
/** 约分 */
- (Fraction *)simWithFraction:(Fraction *)frac;

@end
